package com.octopus.kernal.controller;

import java.io.Serializable;

import javax.servlet.http.HttpServletRequest;

import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;

import com.octopus.kernal.model.BaseStruct;

public interface ControllerInterface<T extends BaseStruct, S extends AbstractSearchCommand<T>, PK extends Serializable> {
	
	public String query(Model model, HttpServletRequest request, S searchCommand);
	
	public String search(Model model, HttpServletRequest request, S searchCommand);
	
	public String create(Model model, HttpServletRequest request, T entity);
	
	public String saveCreate(Model model, HttpServletRequest request, T entity, BindingResult errors);
	
	public String edit(Model model, HttpServletRequest request, PK id, T entity);
	
	public String saveEdit(Model model, HttpServletRequest request, PK id, T entity, BindingResult errors);
	
	public String view(Model model, HttpServletRequest request, PK id, T entity);
	
	public String delete(Model model, HttpServletRequest request, PK id);

}
